package com.design;

import com.design.appliance.AirConditioner;
import com.design.appliance.Fan;
import com.design.remote.IRemote;
import com.design.remote.impl.App;
import com.design.remote.impl.RemoteControl;
import com.design.remote.impl.VoiceAssistant;

/**
 * 桥接模式测试类
 */
public class MainTest {
    public static void main(String[] args) {
        IRemote app=new App();
        RemoteControl remoteControl = new RemoteControl();
        VoiceAssistant voiceAssistant = new VoiceAssistant();
        new Fan(app).work();
        System.out.println("---------------------------------");
        new Fan(remoteControl).work();
        System.out.println("---------------------------------");
        new Fan(voiceAssistant).work();
        System.out.println("---------------------------------");
        new AirConditioner(app).work();
        System.out.println("---------------------------------");
        new AirConditioner(remoteControl).work();
        System.out.println("---------------------------------");
        new AirConditioner(voiceAssistant).work();
    }
}
